<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="keywords" content="技术博客">
    
    <meta name="author" content="jiesun">
    <!-- preconnect -->
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    
    
    <!--- Seo Part-->
    
    <link rel="canonical" href="https://anca.gitee.io/2023/08/03/antv/"/>
    <meta name="robots" content="index,follow">
    <meta name="googlebot" content="index,follow">
    <meta name="revisit-after" content="1 days">
    
        <meta name="description" content="antv 源码查看">
<meta property="og:type" content="article">
<meta property="og:title" content="antv 源码查看">
<meta property="og:url" content="https://anca.gitee.io/2023/08/03/antv/index.html">
<meta property="og:site_name" content="孙杰的博客">
<meta property="og:description" content="antv 源码查看">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/880e04f184d44468a70c68b3495a7172~tplv-k3u1fbpfcp-watermark.image">
<meta property="og:image" content="https://p9-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/a42cdd14a06a43958d146ad4e22f84fe~tplv-k3u1fbpfcp-watermark.image">
<meta property="og:image" content="https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/3829773aa5fc4d469053ed63d28fcb53~tplv-k3u1fbpfcp-watermark.image">
<meta property="article:published_time" content="2023-08-03T02:49:25.419Z">
<meta property="article:modified_time" content="2023-08-26T16:18:02.174Z">
<meta property="article:author" content="jiesun">
<meta property="article:tag" content="ui框架源码">
<meta property="article:tag" content="源码系列">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/880e04f184d44468a70c68b3495a7172~tplv-k3u1fbpfcp-watermark.image">
    
    
    <!--- Icon Part-->
    <link rel="icon" type="image/png" href="/jiesun.gitee.io/images/redefine-favicon.svg" sizes="192x192">
    <link rel="apple-touch-icon" sizes="180x180" href="/jiesun.gitee.io/images/redefine-favicon.svg">
    <meta name="theme-color" content="#A31F34">
    <link rel="shortcut icon" href="/jiesun.gitee.io/images/redefine-favicon.svg">
    <!--- Page Info-->
    
    <title>
        
            antv 源码查看 -
        
        极乐净土
    </title>
    
<link rel="stylesheet" href="/jiesun.gitee.io/css/style.css">


    
        
<link rel="stylesheet" href="/jiesun.gitee.io/css/build/styles.css">

    

    
<link rel="stylesheet" href="/jiesun.gitee.io/fonts/fonts.css">

    
<link rel="stylesheet" href="/jiesun.gitee.io/fonts/Satoshi/satoshi.css">

    
<link rel="stylesheet" href="/jiesun.gitee.io/fonts/Chillax/chillax.css">

    <!--- Font Part-->
    
    
    
    

    <!--- Inject Part-->
    
    <script id="hexo-configurations">
    let Global = window.Global || {};
    Global.hexo_config = {"hostname":"anca.gitee.io","root":"/jiesun.gitee.io/","language":"zh-CN"};
    Global.theme_config = {"articles":{"style":{"font_size":"16px","line_height":1.5,"image_border_radius":"14px","image_alignment":"center","image_caption":false,"link_icon":true},"word_count":{"enable":true,"count":true,"min2read":true},"author_label":{"enable":true,"auto":false,"list":[]},"code_block":{"copy":true,"style":"mac","font":{"enable":false,"family":null,"url":null}},"toc":{"enable":true,"max_depth":3,"number":false,"expand":true,"init_open":true},"copyright":true,"lazyload":true,"recommendation":{"enable":false,"title":"推荐阅读","limit":3,"mobile_limit":2,"placeholder":"/images/wallhaven-wqery6-light.webp","skip_dirs":[]}},"colors":{"primary":"#A31F34","secondary":null},"global":{"fonts":{"chinese":{"enable":false,"family":null,"url":null},"english":{"enable":false,"family":null,"url":null}},"content_max_width":"1000px","sidebar_width":"210px","hover":{"shadow":true,"scale":false},"scroll_progress":{"bar":false,"percentage":true},"website_counter":{"url":"https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js","enable":true,"site_pv":true,"site_uv":true,"post_pv":true},"single_page":true,"open_graph":true,"google_analytics":{"enable":false,"id":null}},"home_banner":{"enable":true,"style":"fixed","image":{"light":"/images/wallhaven-wqery6-light.webp","dark":"/images/wallhaven-wqery6-dark.webp"},"title":"极乐净土","subtitle":{"text":[],"hitokoto":{"enable":false,"api":"https://v1.hitokoto.cn"},"typing_speed":100,"backing_speed":80,"starting_delay":500,"backing_delay":1500,"loop":true,"smart_backspace":true},"text_color":{"light":"#fff","dark":"#d1d1b6"},"text_style":{"title_size":"2.8rem","subtitle_size":"1.5rem","line_height":1.2},"custom_font":{"enable":false,"family":null,"url":null},"social_links":{"enable":false,"links":{"github":null,"instagram":null,"zhihu":null,"twitter":null,"email":null},"qrs":{"weixin":null}}},"plugins":{"feed":{"enable":false},"aplayer":{"enable":true,"type":"fixed","audios":[{"name":"起风了","artist":"买辣椒也用券","url":"https://music.163.com/song/media/outer/url?id=1330348068.mp3","cover":"https://p2.music.126.net/diGAyEmpymX8G7JcnElncQ==/109951163699673355.jpg?param=130y130"},{"name":"盗墓笔记·十年人间","artist":"青肆ToriDo","url":"https://music.163.com/song/media/outer/url?id=1298484254.mp3","cover":"https://p2.music.126.net/4vY0tPpnINMLzjV8UKywIg==/109951163438805808.jpg?param=130y130"},{"name":"囍","artist":"葛东琪","url":"https://music.163.com/song/media/outer/url?id=1303289043.mp3","cover":"https://p2.music.126.net/H3Q3SeMVtuHvHY2uyaQdOw==/109951163472855051.jpg?param=130y130"}]},"mermaid":{"enable":false,"version":"9.3.0"}},"version":"2.4.4","navbar":{"auto_hide":false,"color":{"left":"#f78736","right":"#367df7","transparency":35},"links":{"Home":{"path":"/","icon":"fa-regular fa-house"},"Memos":{"path":"/essay","icon":"fa-regular fa-lightbulb"},"Archives":{"icon":"fa-regular fa-archive","submenus":{"Archives":"/archives","Categories":"/categories","Tags":"/tags"}}},"search":{"enable":false,"preload":true}},"page_templates":{"friends_column":2,"tags_style":"blur"},"home":{"sidebar":{"enable":true,"position":"left","first_item":"menu","announcement":null,"links":null},"article_date_format":"auto","categories":{"enable":true,"limit":3},"tags":{"enable":true,"limit":3}},"footerStart":"2022/8/17 11:45:14"};
    Global.language_ago = {"second":"%s 秒前","minute":"%s 分钟前","hour":"%s 小时前","day":"%s 天前","week":"%s 周前","month":"%s 个月前","year":"%s 年前"};
    Global.data_config = {"masonry":false};
  </script>
    
    <!--- Fontawesome Part-->
    
<link rel="stylesheet" href="/jiesun.gitee.io/fontawesome/fontawesome.min.css">

    
<link rel="stylesheet" href="/jiesun.gitee.io/fontawesome/brands.min.css">

    
<link rel="stylesheet" href="/jiesun.gitee.io/fontawesome/solid.min.css">

    
<link rel="stylesheet" href="/jiesun.gitee.io/fontawesome/regular.min.css">

    
    
    
    
<meta name="generator" content="Hexo 6.3.0"></head>


<body>
<div class="progress-bar-container">
    

    
        <span class="pjax-progress-bar"></span>
        <span class="swup-progress-icon">
            <i class="fa-solid fa-circle-notch fa-spin"></i>
        </span>
    
</div>


<main class="page-container" id="swup">

    

    <div class="main-content-container">


        <div class="main-content-header">
            <header class="navbar-container">
    
    <div class="navbar-content">
        <div class="left">
            
            <a class="logo-title" href="https://anca.gitee.io/">
                
                极乐净土
                
            </a>
        </div>

        <div class="right">
            <!-- PC -->
            <div class="desktop">
                <ul class="navbar-list">
                    
                        
                            <li class="navbar-item">
                                <!-- Menu -->
                                <a class="" 
                                    href="/jiesun.gitee.io/"  >
                                    
                                        
                                            <i class="fa-regular fa-house"></i>
                                        
                                        首页
                                    
                                </a>
                                <!-- Submenu -->
                                
                            </li>
                    
                        
                            <li class="navbar-item">
                                <!-- Menu -->
                                <a class="" 
                                    href="/jiesun.gitee.io/essay"  >
                                    
                                        
                                            <i class="fa-regular fa-lightbulb"></i>
                                        
                                        MEMOS
                                    
                                </a>
                                <!-- Submenu -->
                                
                            </li>
                    
                        
                            <li class="navbar-item">
                                <!-- Menu -->
                                <a class="has-dropdown" 
                                    href="#" onClick="return false;">
                                    
                                        
                                            <i class="fa-regular fa-archive"></i>
                                        
                                        归档&nbsp;<i class="fa-solid fa-chevron-down"></i>
                                    
                                </a>
                                <!-- Submenu -->
                                
                                    <ul class="sub-menu">
                                    
                                        <li>
                                        <a href="/jiesun.gitee.io/archives">归档
                                        </a>
                                        </li>
                                    
                                        <li>
                                        <a href="/jiesun.gitee.io/categories">分类
                                        </a>
                                        </li>
                                    
                                        <li>
                                        <a href="/jiesun.gitee.io/tags">标签
                                        </a>
                                        </li>
                                    
                                    </ul>
                                
                            </li>
                    
                    
                </ul>
            </div>
            <!-- Mobile -->
            <div class="mobile">
                
                <div class="icon-item navbar-bar">
                    <div class="navbar-bar-middle"></div>
                </div>
            </div>
        </div>
    </div>

    <!-- Mobile drawer -->
    <div class="navbar-drawer w-full absolute top-0 left-0 bg-background-color">
        <ul class="drawer-navbar-list flex flex-col justify-start items-center">
            
                
                    <li class="drawer-navbar-item text-base my-1.5 flex justify-center items-center">
                        <a class="rounded-3xl py-1.5 px-5 hover:border hover:!text-primary active:!text-primary group " 
                        href="/jiesun.gitee.io/"  >
                             
                                
                                    <i class="fa-regular fa-house"></i>
                                
                                首页
                            
                        </a>
                    </li>
                    <!-- Submenu -->
                    
            
                
                    <li class="drawer-navbar-item text-base my-1.5 flex justify-center items-center">
                        <a class="rounded-3xl py-1.5 px-5 hover:border hover:!text-primary active:!text-primary group " 
                        href="/jiesun.gitee.io/essay"  >
                             
                                
                                    <i class="fa-regular fa-lightbulb"></i>
                                
                                MEMOS
                            
                        </a>
                    </li>
                    <!-- Submenu -->
                    
            
                
                    <li class="drawer-navbar-item text-base my-1.5 flex justify-center items-center">
                        <a class="rounded-3xl py-1.5 px-5 hover:border hover:!text-primary active:!text-primary group has-dropdown" 
                        href="#" onClick="return false;">
                            
                                
                                    <i class="fa-regular fa-archive"></i>
                                
                                归档&nbsp;<i class="group-hover:rotate-180 transition-transform fa-solid fa-chevron-down"></i>
                            
                        </a>
                    </li>
                    <!-- Submenu -->
                              
                        
                            <li class="text-base flex justify-center items-center hover:underline active:underline hover:underline-offset-1 rounded-3xl">
                                <a class="py-0.5" href="/jiesun.gitee.io/archives">归档</a>
                            </li>
                        
                            <li class="text-base flex justify-center items-center hover:underline active:underline hover:underline-offset-1 rounded-3xl">
                                <a class="py-0.5" href="/jiesun.gitee.io/categories">分类</a>
                            </li>
                        
                            <li class="text-base flex justify-center items-center hover:underline active:underline hover:underline-offset-1 rounded-3xl">
                                <a class="py-0.5" href="/jiesun.gitee.io/tags">标签</a>
                            </li>
                        
                    
            

        </ul>
    </div>

    <div class="window-mask"></div>

</header>


        </div>

        <div class="main-content-body">

            

            <div class="main-content">

                
                    <div class="post-page-container">
    <div class="article-content-container">

        <div class="article-title">
            
                
                
                <img src="https://anca.gitee.io/jiesun.gitee.io/images/bg10.jpeg" alt="antv 源码查看" class="max-w-none"/>
                
                <h1 class="article-title-cover">antv 源码查看</h1>
            
            </div>
            
                    
        
        
            <div class="article-header">
                <div class="avatar">
                    <img src="/jiesun.gitee.io/images/redefine-avatar.svg">
                </div>
                <div class="info">
                    <div class="author">
                        <span class="name">jiesun</span>
                        
                            <span class="author-label">Lv3</span>
                        
                    </div>
                    <div class="meta-info">
                        <div class="article-meta-info">
    <span class="article-date article-meta-item">
        <i class="fa-regular fa-pen-fancy"></i>&nbsp;
        <span class="desktop">2023-08-03 10:49:25</span>
        <span class="mobile">2023-08-03 10:49:25</span>
        <span class="hover-info">创建</span>
    </span>
    
        <span class="article-date article-meta-item">
            <i class="fa-regular fa-wrench"></i>&nbsp;
            <span class="desktop">2023-08-27 00:18:02</span>
            <span class="mobile">2023-08-27 00:18:02</span>
            <span class="hover-info">更新</span>
        </span>
    

    
        <span class="article-categories article-meta-item">
            <i class="fa-regular fa-folders"></i>&nbsp;
            <ul>
                
                
                    
                        
                        <li>
                            <a href="/jiesun.gitee.io/categories/ui%E6%A1%86%E6%9E%B6/">ui框架</a>&nbsp;
                        </li>
                    
                    
                
            </ul>
        </span>
    
    
        <span class="article-tags article-meta-item">
            <i class="fa-regular fa-tags"></i>&nbsp;
            <ul>
                
                    <li>
                        <a href="/jiesun.gitee.io/tags/ui%E6%A1%86%E6%9E%B6%E6%BA%90%E7%A0%81/">ui框架源码</a>&nbsp;
                    </li>
                
                    <li>
                        | <a href="/jiesun.gitee.io/tags/%E6%BA%90%E7%A0%81%E7%B3%BB%E5%88%97/">源码系列</a>&nbsp;
                    </li>
                
            </ul>
        </span>
    

    
    
    
    
        <span class="article-pv article-meta-item">
            <i class="fa-regular fa-eye"></i>&nbsp;<span id="busuanzi_value_page_pv"></span>
        </span>
    
</div>

                    </div>
                </div>
            </div>
        

        


        <div class="article-content markdown-body">
            <h1 id="为什么看源码？"><a href="#为什么看源码？" class="headerlink" title="为什么看源码？"></a>为什么看源码？</h1><p>自搭组件库，目的是改造成我们自己的组件库。 <code>后期大版本升级非常麻烦</code></p>
<h1 id="文档网站怎么改？"><a href="#文档网站怎么改？" class="headerlink" title="文档网站怎么改？"></a>文档网站怎么改？</h1><pre><code> &quot;predev&quot;: &quot;npm run version &amp; npm run collect-token-statistic &amp; npm run token-meta &amp;&amp; node node_modules/esbuild/install.js&quot;, // 生成版本号；
&quot;dev&quot;: &quot;npm run predev &amp;&amp; npm run routes &amp;&amp; vite serve site&quot; // vite serve site 用来跑文档网站 而npm run routes 用来生成路由
&quot;fast-dev&quot;: &quot;npm run routes &amp;&amp; vite serve site&quot;
&quot;routes&quot;: &quot;node site/scripts/genrateRoutes.js&quot;,
</code></pre>
<h3 id="文档网站构造"><a href="#文档网站构造" class="headerlink" title="文档网站构造"></a>文档网站构造</h3><p><img  
                     lazyload
                     src="/images/loading.svg"
                     data-src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/880e04f184d44468a70c68b3495a7172~tplv-k3u1fbpfcp-watermark.image"
                      alt="image.png"
                ></p>
<p><strong>1.生成路由</strong></p>
<blockquote>
<p>npm run routes：node site&#x2F;scripts&#x2F;genrateRoutes.js</p>
</blockquote>
<p>主要任务：会使用nodejs 捕捉 components 下面的md,然后根据路径生成路由需要的东西（字符串模版），写入到js文件里面 （详情见<code>genrateRoutes.js</code>文件）</p>
<p>然后在main.js引入routes。</p>
<p><strong>2.md文件转vue组件在页面渲染</strong></p>
<p><strong>中间出现一个问题？–</strong> <code>md怎么被编译的，怎么就在页面正确展示了？</code></p>
<p>团队自己写了一个将md文件格式编译成vue的插件。内部很细（详见<code>markdownToVue.js</code>文件）</p>
<p>不仅仅如此，内部实现了vueToMarkdown插件（详见<code>vueToMarkdown.js</code>文件），作用是将vue的demo等文件可以转换成md格式，在页面渲染</p>
<p><strong>怎么做到将demo文件下拼到md文件中？</strong></p>
<p><img  
                     lazyload
                     src="/images/loading.svg"
                     data-src="https://p9-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/a42cdd14a06a43958d146ad4e22f84fe~tplv-k3u1fbpfcp-watermark.image"
                      alt="image.png"
                ></p>
<p><strong>3.文档一些其他组件查看</strong></p>
<ol>
<li>Layout组件： 内置了 router-view。 将除了一些主题编辑等页面 内置在组件内部 内置左边的菜单</li>
</ol>
<div class="highlight-container" data-rel="Js"><figure class="iseeu highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">const</span> useMenus = (): &#123;</span><br><span class="line">  <span class="attr">menus</span>: <span class="title class_">ComputedRef</span>&lt;any[]&gt;;</span><br><span class="line">  <span class="attr">dataSource</span>: <span class="title class_">ComputedRef</span>&lt;any[]&gt;;</span><br><span class="line">  <span class="attr">currentMenuIndex</span>: <span class="title class_">ComputedRef</span>&lt;number&gt;;</span><br><span class="line">  <span class="attr">activeMenuItem</span>: <span class="title class_">ComputedRef</span>&lt;string&gt;;</span><br><span class="line">&#125; =&gt; &#123;</span><br><span class="line">  <span class="keyword">const</span> route = <span class="title function_">useRoute</span>();</span><br><span class="line">  <span class="keyword">const</span> router = <span class="title function_">useRouter</span>();</span><br><span class="line">  <span class="keyword">const</span> routes = router.<span class="title function_">getRoutes</span>();</span><br><span class="line">  <span class="keyword">const</span> globalConfig = inject&lt;any&gt;(<span class="variable constant_">GLOBAL_CONFIG</span>);</span><br><span class="line">  <span class="keyword">const</span> menus = <span class="title function_">computed</span>(<span class="function">() =&gt;</span> &#123;</span><br><span class="line">    <span class="keyword">const</span> path = route.<span class="property">path</span>;</span><br><span class="line">    <span class="keyword">const</span> category = path.<span class="title function_">split</span>(<span class="string">&#x27;/&#x27;</span>)[<span class="number">1</span>]; <span class="comment">// 例如 http://localhost:5173/docs/vue/introduce-cn 中 &#x27;docs&#x27; </span></span><br><span class="line">    <span class="keyword">const</span> pattern = <span class="regexp">/^\/iframe/</span>;</span><br><span class="line">    <span class="keyword">const</span> isZhCN = globalConfig.<span class="property">isZhCN</span>.<span class="property">value</span>;</span><br><span class="line">    <span class="keyword">const</span> ms = routes</span><br><span class="line">      .<span class="title function_">filter</span>(<span class="function"><span class="params">r</span> =&gt;</span> &#123;</span><br><span class="line">      <span class="comment">// 根据当前路由例如 </span></span><br><span class="line">        <span class="keyword">const</span> inCategory =</span><br><span class="line">          r.<span class="property">meta</span> &amp;&amp;</span><br><span class="line">          r.<span class="property">meta</span>.<span class="property">category</span> &amp;&amp;</span><br><span class="line">          (r.<span class="property">meta</span>.<span class="property">category</span> <span class="keyword">as</span> string).<span class="title function_">toLowerCase</span>() === category &amp;&amp;</span><br><span class="line">          !pattern.<span class="title function_">test</span>(r.<span class="property">path</span>); </span><br><span class="line">          </span><br><span class="line">        <span class="keyword">if</span> (inCategory &amp;&amp; category === <span class="string">&#x27;docs&#x27;</span>) &#123;</span><br><span class="line">          <span class="keyword">if</span> (isZhCN) &#123;</span><br><span class="line">            <span class="keyword">return</span> r.<span class="property">path</span>.<span class="title function_">indexOf</span>(<span class="string">&#x27;-cn&#x27;</span>) &gt;= <span class="number">0</span>;</span><br><span class="line">          &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">            <span class="keyword">return</span> r.<span class="property">path</span>.<span class="title function_">indexOf</span>(<span class="string">&#x27;-cn&#x27;</span>) === -<span class="number">1</span>;</span><br><span class="line">          &#125;</span><br><span class="line">        &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">          <span class="keyword">return</span> inCategory;</span><br><span class="line">        &#125;</span><br><span class="line">      &#125;)</span><br><span class="line">      <span class="comment">// 在这根据当前语言将routes里面中英文分开</span></span><br><span class="line">      .<span class="title function_">map</span>(<span class="function"><span class="params">r</span> =&gt;</span> (&#123; ...r.<span class="property">meta</span>, <span class="attr">path</span>: r.<span class="property">path</span>.<span class="title function_">split</span>(<span class="string">&#x27;:lang&#x27;</span>)[<span class="number">0</span>].<span class="title function_">replace</span>(<span class="string">&#x27;-cn&#x27;</span>, <span class="string">&#x27;&#x27;</span>) &#125;)); </span><br><span class="line">    <span class="keyword">return</span> ms;</span><br><span class="line">  &#125;);</span><br><span class="line">  <span class="keyword">const</span> activeMenuItem = <span class="title function_">computed</span>(<span class="function">() =&gt;</span> &#123;</span><br><span class="line">    <span class="keyword">return</span> route.<span class="property">path</span>.<span class="title function_">split</span>(<span class="string">&#x27;-cn&#x27;</span>)[<span class="number">0</span>];</span><br><span class="line">  &#125;);</span><br><span class="line">  <span class="keyword">const</span> currentMenuIndex = <span class="title function_">computed</span>(<span class="function">() =&gt;</span> &#123;</span><br><span class="line">    <span class="keyword">return</span> menus.<span class="property">value</span>.<span class="title function_">findIndex</span>(<span class="function"><span class="params">m</span> =&gt;</span> m.<span class="property">path</span> === activeMenuItem.<span class="property">value</span>);</span><br><span class="line">  &#125;);</span><br><span class="line">  <span class="keyword">const</span> dataSource = <span class="title function_">computed</span>(<span class="function">() =&gt;</span> &#123;</span><br><span class="line">    <span class="comment">// 根据type｜｜category 进行分组 生成左边的菜单</span></span><br><span class="line">    <span class="keyword">const</span> group = <span class="title function_">groupBy</span>(menus.<span class="property">value</span>, <span class="function">(<span class="params">m: any</span>) =&gt;</span> m.<span class="property">type</span> || m.<span class="property">category</span>);</span><br><span class="line">    <span class="keyword">const</span> <span class="attr">keys</span>: string[] = <span class="title class_">Object</span>.<span class="title function_">keys</span>(group);</span><br><span class="line">    <span class="keyword">const</span> newMenus = keys</span><br><span class="line">      .<span class="title function_">map</span>(<span class="function"><span class="params">key</span> =&gt;</span> &#123;</span><br><span class="line">        <span class="keyword">return</span> &#123;</span><br><span class="line">          <span class="attr">title</span>: key,</span><br><span class="line">          <span class="attr">order</span>: typeOrder[key] &amp;&amp; typeOrder[key].<span class="property">order</span>,</span><br><span class="line">          <span class="attr">enTitle</span>: typeOrder[key] &amp;&amp; typeOrder[key].<span class="property">en</span>,</span><br><span class="line">          <span class="attr">children</span>: <span class="title function_">sortBy</span>(group[key], <span class="string">&#x27;title&#x27;</span>),</span><br><span class="line">        &#125;;</span><br><span class="line">      &#125;)</span><br><span class="line">      .<span class="title function_">sort</span>(<span class="function">(<span class="params">a, b</span>) =&gt;</span> a.<span class="property">order</span> - b.<span class="property">order</span>);</span><br><span class="line">    <span class="keyword">return</span> keys.<span class="property">length</span> === <span class="number">1</span> ? menus.<span class="property">value</span> : newMenus;</span><br><span class="line">  &#125;);</span><br><span class="line">  <span class="keyword">return</span> &#123; menus, dataSource, activeMenuItem, currentMenuIndex &#125;;</span><br><span class="line">&#125;; </span><br></pre></td></tr></table></figure></div>

<ol start="2">
<li>SearchBox</li>
</ol>
<div class="highlight-container" data-rel="Js"><figure class="iseeu highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"><span class="variable language_">window</span>.<span class="title function_">docsearch</span>(&#123;</span><br><span class="line">        <span class="attr">apiKey</span>: <span class="string">&#x27;92003c1d1d07beef165b08446f4224a3&#x27;</span>,</span><br><span class="line">        <span class="attr">indexName</span>: <span class="string">&#x27;antdv&#x27;</span>,</span><br><span class="line">        <span class="attr">inputSelector</span>: <span class="string">&#x27;#search-box input&#x27;</span>,</span><br><span class="line">        <span class="attr">algoliaOptions</span>: &#123; <span class="attr">facetFilters</span>: [<span class="string">`tags:<span class="subst">$&#123;globalConfig.isZhCN.value ? <span class="string">&#x27;cn&#x27;</span> : <span class="string">&#x27;en&#x27;</span>&#125;</span>`</span>] &#125;,</span><br><span class="line">        <span class="title function_">transformData</span>(<span class="params">hits: any[]</span>) &#123;</span><br><span class="line">          hits.<span class="title function_">forEach</span>(<span class="function"><span class="params">hit</span> =&gt;</span> &#123;</span><br><span class="line">            hit.<span class="property">url</span> = hit.<span class="property">url</span>.<span class="title function_">replace</span>(<span class="string">&#x27;www.antdv.com&#x27;</span>, <span class="variable language_">window</span>.<span class="property">location</span>.<span class="property">host</span>);</span><br><span class="line">            hit.<span class="property">url</span> = hit.<span class="property">url</span>.<span class="title function_">replace</span>(<span class="string">&#x27;https:&#x27;</span>, <span class="variable language_">window</span>.<span class="property">location</span>.<span class="property">protocol</span>);</span><br><span class="line">          &#125;);</span><br><span class="line">          <span class="keyword">return</span> hits;</span><br><span class="line">        &#125;,</span><br><span class="line">        <span class="attr">debug</span>: <span class="literal">false</span>, <span class="comment">// Set debug to true if you want to inspect the dropdown</span></span><br><span class="line">      &#125;)</span><br></pre></td></tr></table></figure></div>
<p>这段代码是使用 DocSearch 插件进行文档搜索的初始化配置代码。具体审美意义可能因人而异，但以下是这段代码的一些重要部分和功能：</p>
<ul>
<li><code>***: &#39;92003c1d1d07beef165b08446f4224a3&#39;</code>: 这是 Algolia 的搜索 API 密钥，用于连接到 Algolia 搜索服务并获取搜索结果。</li>
<li><code>indexName: &#39;antdv&#39;</code>: 这是要搜索的索引名称，指定了要在 Algolia 搜索服务中搜索的特定索引。</li>
<li><code>inputSelector: &#39;#search-box input&#39;</code>: 这是指定搜索框元素的选择器。在这个例子中，搜索框元素是位于 <code>id</code> 为 <code>search-box</code> 的元素下的 <code>input</code> 元素。</li>
<li><code>algoliaOptions: &#123; facetFilters: [</code>tags:${globalConfig.isZhCN.value ? ‘cn’ : ‘en’}<code>] &#125;</code>: 这是 Algolia 的选项，用于传递一些额外的搜索参数。在这个例子中，使用 <code>facetFilters</code> 参数根据标签（tags）过滤搜索结果，根据 <code>globalConfig.isZhCN.value</code> 的值选择中文或英文标签。</li>
<li><code>transformData(hits: any[]) &#123; ... &#125;</code>: 这是一个回调函数，用于自定义搜索结果的数据转换。在这个例子中，为搜索结果中的每个条目修改了 URL，以便正确跳转到目标文档页面。</li>
<li><code>debug: false</code>: 这是一个调试选项，可以将它设置为 <code>true</code> 来查看搜索结果的下拉菜单。</li>
</ul>
<p>这段代码的目的是通过配置 DocSearch，使其能够连接到 Algolia 搜索服务，并在特定的搜索框中实现即时的文档搜索。通过对搜索结果的定制和其他选项的设置，可以按需扩展和调整搜索功能。</p>
<p><code>下面aidog关于DocSearch的搜索结果</code></p>
<p>DocSearch 是一个由 Algolia 提供的文档搜索解决方案，它可以帮助你搜索整个文档。</p>
<p>DocSearch 使用 Algolia 的搜索服务来构建和索引文档内容，并提供快速、高效的搜索功能。它提供了一个基于 JavaScript 的客户端库，通过集成 Algolia 的搜索 API，能够实时搜索并返回文档搜索结果。</p>
<p>具体来说，当你使用 DocSearch 时，以下是它是如何实现搜索整个文档的：</p>
<ol>
<li>建立索引：你需要为你的文档网站创建和配置一个 Algolia 索引。这涉及到将文档内容转换为适合搜索的数据格式，并将其上传到 Algolia 的索引中。</li>
<li>配置 DocSearch：使用 DocSearch 提供的初始化方法来配置搜索功能。你需要提供正确的 Algolia 搜索 API 密钥、索引名称以及搜索输入框的选择器。</li>
<li>后台搜索：当用户在搜索输入框中输入关键字时，DocSearch 会将搜索请求发送到 Algolia 的搜索 API。Algolia 会根据预先创建的索引，筛选和匹配与关键字相关的文档内容，并将搜索结果返回给 DocSearch。</li>
<li>前端呈现：DocSearch 将搜索结果呈现为下拉菜单，并在用户输入关键字时实时更新。下拉菜单中的每一项表示一个匹配的搜索结果，通常包含文档标题、摘要和链接等信息。</li>
<li>交互操作：当用户选择某个搜索结果时，可以触发相关的操作，例如导航到文档页面或执行其他操作，这取决于你的具体实现。</li>
</ol>
<p>总之，DocSearch 通过使用 Algolia 的搜索服务和提供的客户端库，提供了一个方便、快速的文档搜索解决方案，能够帮助你搜索整个文档，并在前端界面上显示和交互搜索结果。</p>
<h1 id="组件代码怎么修改？"><a href="#组件代码怎么修改？" class="headerlink" title="组件代码怎么修改？"></a>组件代码怎么修改？</h1><p>例如button, 使用的defineComponent api  具体业务写在setup</p>
<div class="highlight-container" data-rel="Jsx"><figure class="iseeu highlight jsx"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">export</span> <span class="keyword">default</span> <span class="title function_">defineComponent</span>(&#123;</span><br><span class="line">  <span class="attr">compatConfig</span>: &#123; <span class="attr">MODE</span>: <span class="number">3</span> &#125;,</span><br><span class="line">  <span class="attr">name</span>: <span class="string">&#x27;AButton&#x27;</span>,</span><br><span class="line">  <span class="attr">inheritAttrs</span>: <span class="literal">false</span>,</span><br><span class="line">  <span class="attr">__ANT_BUTTON</span>: <span class="literal">true</span>,</span><br><span class="line">  <span class="attr">props</span>: <span class="title function_">initDefaultProps</span>(<span class="title function_">buttonProps</span>(), &#123; <span class="attr">type</span>: <span class="string">&#x27;default&#x27;</span> &#125;),</span><br><span class="line">  <span class="attr">slots</span>: <span class="title class_">Object</span> <span class="keyword">as</span> <span class="title class_">CustomSlotsType</span>&lt;&#123;</span><br><span class="line">    <span class="attr">icon</span>: any;</span><br><span class="line">    <span class="attr">default</span>: any;</span><br><span class="line">  &#125;&gt;,</span><br><span class="line">  <span class="comment">// emits: [&#x27;click&#x27;, &#x27;mousedown&#x27;],</span></span><br><span class="line">  <span class="title function_">setup</span>(<span class="params">props, &#123; slots, attrs, emit, expose &#125;</span>) &#123; <span class="comment">// 业务代码</span></span><br><span class="line">  &#125;</span><br></pre></td></tr></table></figure></div>

<p><code>样式怎么处理的?</code></p>
<div class="highlight-container" data-rel="Jsx"><figure class="iseeu highlight jsx"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">const</span> buttonProps = &#123;</span><br><span class="line">       ...attrs,</span><br><span class="line">       title,</span><br><span class="line">       <span class="attr">disabled</span>: mergedDisabled.<span class="property">value</span>,</span><br><span class="line">       <span class="attr">class</span>: [</span><br><span class="line">         classes.<span class="property">value</span>,</span><br><span class="line">         attrs.<span class="property">class</span>,</span><br><span class="line">         &#123; [<span class="string">`<span class="subst">$&#123;prefixCls.value&#125;</span>-icon-only`</span>]: children.<span class="property">length</span> === <span class="number">0</span> &amp;&amp; !!iconType &#125;,</span><br><span class="line">       ],</span><br><span class="line">       <span class="attr">onClick</span>: handleClick,</span><br><span class="line">       <span class="attr">onMousedown</span>: handleMousedown,</span><br><span class="line">     &#125;;</span><br><span class="line"></span><br></pre></td></tr></table></figure></div>
<p>通过拼接 attrs 组成新的props 放到 button 上</p>
<h1 id="样式主题怎么修改？token-是怎么处理的"><a href="#样式主题怎么修改？token-是怎么处理的" class="headerlink" title="样式主题怎么修改？token 是怎么处理的?"></a>样式主题怎么修改？token 是怎么处理的?</h1><p><code>/docs/vue/customize-theme-cn</code>(这个路由是描述自定义主题的路由) </p>
<p>内部使用了vue3 提供的<code>privode</code> 和 <code>inject</code>，只需要在最外面的app进行包裹，设置的值，会在底层的组件被截取到, 截取到之后和defaultToken进行解构拼接</p>
<div class="highlight-container" data-rel="Jsx"><figure class="iseeu highlight jsx"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">&lt;a-config-provider </span><br><span class="line">  :theme=<span class="string">&quot;&#123; token: &#123; colorPrimary: &#x27;#00b96b&#x27;, &#125;, &#125;&quot;</span> &gt;</span><br><span class="line">    <span class="language-xml"><span class="tag">&lt;<span class="name">a-button</span> /&gt;</span></span> </span><br><span class="line">&lt;/a-config-provider&gt;</span><br></pre></td></tr></table></figure></div>

<p>可以在 <code>theme-editor-cn</code> 生成一套自定义主题 用于开发</p>
<h1 id="框架怎么转换md渲染成html？"><a href="#框架怎么转换md渲染成html？" class="headerlink" title="框架怎么转换md渲染成html？"></a>框架怎么转换md渲染成html？</h1><p>团队自己写了一个将md文件格式编译成vue的插件。内部很细（详见<code>markdownToVue.js</code>文件）</p>
<p>不仅仅如此，内部实现了vueToMarkdown插件（详见<code>vueToMarkdown.js</code>文件），作用是将vue的demo等文件可以转换成md格式，在页面渲染</p>
<h1 id="单元测试"><a href="#单元测试" class="headerlink" title="单元测试"></a>单元测试</h1><p>待办</p>
<h1 id="怎么部署到私服"><a href="#怎么部署到私服" class="headerlink" title="怎么部署到私服"></a>怎么部署到私服</h1><ol>
<li>根据讯飞的方法生成权限码<br><img  
                     lazyload
                     src="/images/loading.svg"
                     data-src="https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/3829773aa5fc4d469053ed63d28fcb53~tplv-k3u1fbpfcp-watermark.image"
                      alt="image.png"
                ></li>
<li>原本antv自带了pub脚本 直接发到github公网上，现在改造了下 使用<code>pub</code>脚本<div class="highlight-container" data-rel="Js"><figure class="iseeu highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="string">&quot;pub-abandon&quot;</span>: <span class="string">&quot;npm run version &amp; npm run collect-token-statistic &amp; npm run token-meta &amp;&amp; node --max_old_space_size=8192 antd-tools/cli/run.js pub&quot;</span>,</span><br><span class="line"><span class="string">&quot;pub&quot;</span>: <span class="string">&quot;npm run version &amp; npm run collect-token-statistic &amp; npm run token-meta &amp;&amp; npm publish --registry https://depend.iflytek.com/artifactory/api/npm/npm-private --with-antd-tools&quot;</span>,</span><br></pre></td></tr></table></figure></div>
<code>npm run collect-token-statistic</code> ：收集token的静态变量 生成token.json –具体组件用到的颜色，例如 Layout 用到 colorBgLayout</li>
</ol>
<p><code>npm run token-meta</code>：生成主题编辑页面的json文件</p>
<ol start="3">
<li>文档网站怎么部署<br>-npm run pub:site 详情见质效平台</li>
</ol>

        </div>

        
            <div class="post-copyright-info">
                <div class="article-copyright-info-container">
    <ul>
        <li><strong>标题:</strong> antv 源码查看</li>
        <li><strong>作者:</strong> jiesun</li>
        <li><strong>创建于
                :</strong> 2023-08-03 10:49:25</li>
        
            <li>
                <strong>更新于
                    :</strong> 2023-08-27 00:18:02
            </li>
        
        <li>
            <strong>链接:</strong> https://anca.gitee.io/jiesun.gitee.io/2023/08/03/antv/
        </li>
        <li>
            <strong>
                版权声明:
            </strong>
            
            本文章采用 <a class="license" target="_blank" rel="noopener" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh">CC BY-NC-SA 4.0</a> 进行许可。
            

        </li>
    </ul>
</div>

            </div>
        

        
            <ul class="post-tags-box">
                
                    <li class="tag-item">
                        <a href="/jiesun.gitee.io/tags/ui%E6%A1%86%E6%9E%B6%E6%BA%90%E7%A0%81/">#ui框架源码</a>&nbsp;
                    </li>
                
                    <li class="tag-item">
                        <a href="/jiesun.gitee.io/tags/%E6%BA%90%E7%A0%81%E7%B3%BB%E5%88%97/">#源码系列</a>&nbsp;
                    </li>
                
            </ul>
        

        

        
            <div class="article-nav">
                
                    <div class="article-prev">
                        <a class="prev"
                        rel="prev"
                        href="/jiesun.gitee.io/2023/08/30/zhuomian/"
                        >
                            <span class="left arrow-icon flex justify-center items-center">
                                <i class="fa-solid fa-chevron-left"></i>
                            </span>
                            <span class="title flex justify-center items-center">
                                <span class="post-nav-title-item">中秋到了，打造一个中秋节专属桌面背景（花里胡哨）</span>
                                <span class="post-nav-item">上一篇</span>
                            </span>
                        </a>
                    </div>
                
                
                    <div class="article-next">
                        <a class="next"
                        rel="next"
                        href="/jiesun.gitee.io/2023/07/27/vue-api/"
                        >
                            <span class="title flex justify-center items-center">
                                <span class="post-nav-title-item">vue3 api浏览记录</span>
                                <span class="post-nav-item">下一篇</span>
                            </span>
                            <span class="right arrow-icon flex justify-center items-center">
                                <i class="fa-solid fa-chevron-right"></i>
                            </span>
                        </a>
                    </div>
                
            </div>
        


        
    </div>

    
        <div class="toc-content-container">
            <div class="post-toc-wrap">
    <div class="post-toc">
        <div class="toc-title">此页目录</div>
        <div class="page-title">antv 源码查看</div>
        <ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#%E4%B8%BA%E4%BB%80%E4%B9%88%E7%9C%8B%E6%BA%90%E7%A0%81%EF%BC%9F"><span class="nav-text">为什么看源码？</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E6%96%87%E6%A1%A3%E7%BD%91%E7%AB%99%E6%80%8E%E4%B9%88%E6%94%B9%EF%BC%9F"><span class="nav-text">文档网站怎么改？</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E6%96%87%E6%A1%A3%E7%BD%91%E7%AB%99%E6%9E%84%E9%80%A0"><span class="nav-text">文档网站构造</span></a></li></ol></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E7%BB%84%E4%BB%B6%E4%BB%A3%E7%A0%81%E6%80%8E%E4%B9%88%E4%BF%AE%E6%94%B9%EF%BC%9F"><span class="nav-text">组件代码怎么修改？</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E6%A0%B7%E5%BC%8F%E4%B8%BB%E9%A2%98%E6%80%8E%E4%B9%88%E4%BF%AE%E6%94%B9%EF%BC%9Ftoken-%E6%98%AF%E6%80%8E%E4%B9%88%E5%A4%84%E7%90%86%E7%9A%84"><span class="nav-text">样式主题怎么修改？token 是怎么处理的?</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E6%A1%86%E6%9E%B6%E6%80%8E%E4%B9%88%E8%BD%AC%E6%8D%A2md%E6%B8%B2%E6%9F%93%E6%88%90html%EF%BC%9F"><span class="nav-text">框架怎么转换md渲染成html？</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E5%8D%95%E5%85%83%E6%B5%8B%E8%AF%95"><span class="nav-text">单元测试</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E6%80%8E%E4%B9%88%E9%83%A8%E7%BD%B2%E5%88%B0%E7%A7%81%E6%9C%8D"><span class="nav-text">怎么部署到私服</span></a></li></ol>

    </div>
</div>
        </div>
    
</div>



                

            </div>

            

        </div>

        <div class="main-content-footer">
            <footer class="footer mt-5 py-5 h-auto text-base text-third-text-color relative border-t-2 border-t-border-color">
    <div class="info-container py-3 text-center">
        
        <div class="text-center">
            &copy;
            
              <span>2022</span>
              -
            
            2023&nbsp;&nbsp;<i class="fa-solid fa-heart fa-beat" style="--fa-animation-duration: 0.5s; color: #f54545"></i>&nbsp;&nbsp;<a href="/">jiesun</a>
        </div>
        
            <script data-swup-reload-script src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
            <div class="relative text-center lg:absolute lg:right-[20px] lg:top-1/2 lg:-translate-y-1/2 lg:text-right">
                
                    <span id="busuanzi_container_site_uv" class="lg:!block">
                        <span class="text-sm">访问人数</span>
                        <span id="busuanzi_value_site_uv"></span>
                    </span>
                
                
                    <span id="busuanzi_container_site_pv" class="lg:!block">
                        <span class="text-sm">总访问量</span>
                        <span id="busuanzi_value_site_pv"></span>
                    </span>
                
            </div>
        
        <div class="relative text-center lg:absolute lg:left-[20px] lg:top-1/2 lg:-translate-y-1/2 lg:text-left">
            <span class="lg:block text-sm">由 <?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="relative top-[2px] inline-block align-baseline" version="1.1" id="圖層_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="1rem" height="1rem" viewBox="0 0 512 512" enable-background="new 0 0 512 512" xml:space="preserve"><path fill="#0E83CD" d="M256.4,25.8l-200,115.5L56,371.5l199.6,114.7l200-115.5l0.4-230.2L256.4,25.8z M349,354.6l-18.4,10.7l-18.6-11V275H200v79.6l-18.4,10.7l-18.6-11v-197l18.5-10.6l18.5,10.8V237h112v-79.6l18.5-10.6l18.5,10.8V354.6z"/></svg><a target="_blank" class="text-base" href="https://hexo.io">Hexo</a> 驱动</span>
            <span class="text-sm lg:block">主题&nbsp;<a class="text-base" target="_blank" href="https://github.com/EvanNotFound/hexo-theme-redefine">Redefine v2.4.4</a></span>
        </div>
        
        
            <div>
                博客已运行 <span class="odometer" id="runtime_days" ></span> 天 <span class="odometer" id="runtime_hours"></span> 小时 <span class="odometer" id="runtime_minutes"></span> 分钟 <span class="odometer" id="runtime_seconds"></span> 秒
            </div>
        
        
            <script data-swup-reload-script>
                try {
                    function odometer_init() {
                    const elements = document.querySelectorAll('.odometer');
                    elements.forEach(el => {
                        new Odometer({
                            el,
                            format: '( ddd).dd',
                            duration: 200
                        });
                    });
                    }
                    odometer_init();
                } catch (error) {}
            </script>
        
        
        
    </div>  
</footer>
        </div>
    </div>

    
        <div class="post-tools">
            <div class="post-tools-container">
    <ul class="article-tools-list">
        <!-- TOC aside toggle -->
        
            <li class="right-bottom-tools page-aside-toggle">
                <i class="fa-regular fa-outdent"></i>
            </li>
        

        <!-- go comment -->
        
    </ul>
</div>

        </div>
    

    <div class="right-side-tools-container">
        <div class="side-tools-container">
    <ul class="hidden-tools-list">
        <li class="right-bottom-tools tool-font-adjust-plus flex justify-center items-center">
            <i class="fa-regular fa-magnifying-glass-plus"></i>
        </li>

        <li class="right-bottom-tools tool-font-adjust-minus flex justify-center items-center">
            <i class="fa-regular fa-magnifying-glass-minus"></i>
        </li>

        <li class="right-bottom-tools tool-expand-width flex justify-center items-center">
            <i class="fa-regular fa-expand"></i>
        </li>

        <li class="right-bottom-tools tool-dark-light-toggle flex justify-center items-center">
            <i class="fa-regular fa-moon"></i>
        </li>

        <!-- rss -->
        

        

        <li class="right-bottom-tools tool-scroll-to-bottom flex justify-center items-center">
            <i class="fa-regular fa-arrow-down"></i>
        </li>
    </ul>

    <ul class="visible-tools-list">
        <li class="right-bottom-tools toggle-tools-list flex justify-center items-center">
            <i class="fa-regular fa-cog fa-spin"></i>
        </li>
        
            <li class="right-bottom-tools tool-scroll-to-top flex justify-center items-center">
                <i class="arrow-up fas fa-arrow-up"></i>
                <span class="percent"></span>
            </li>
        
        
    </ul>
</div>

    </div>

    <div class="image-viewer-container">
    <img src="">
</div>


    

</main>


    
<script src="/jiesun.gitee.io/js/libs/Swup.min.js"></script>

<script src="/jiesun.gitee.io/js/libs/SwupSlideTheme.min.js"></script>

<script src="/jiesun.gitee.io/js/libs/SwupScriptsPlugin.min.js"></script>

<script src="/jiesun.gitee.io/js/libs/SwupProgressPlugin.min.js"></script>

<script src="/jiesun.gitee.io/js/libs/SwupScrollPlugin.min.js"></script>

<script>
    const swup = new Swup({
        plugins: [
            new SwupScriptsPlugin({
                optin: true,
            }),
            new SwupProgressPlugin(),
            new SwupScrollPlugin({
                offset: 80,
            }),
            new SwupSlideTheme({
                mainElement: ".main-content-body",
            }),
        ],
        containers: ["#swup"],
    });

    swup.hooks.on("page:view", () => {
        Global.refresh();
    });

    // if (document.readyState === "complete") {
    //
    // } else {
    //     document.addEventListener("DOMContentLoaded", () => init());
    // }
</script>






<script src="/jiesun.gitee.io/js/utils.js" type="module"></script>

<script src="/jiesun.gitee.io/js/main.js" type="module"></script>

<script src="/jiesun.gitee.io/js/layouts/navbarShrink.js" type="module"></script>

<script src="/jiesun.gitee.io/js/tools/scrollTopBottom.js" type="module"></script>

<script src="/jiesun.gitee.io/js/tools/lightDarkSwitch.js" type="module"></script>

<script src="/jiesun.gitee.io/js/layouts/categoryList.js" type="module"></script>





    
<script src="/jiesun.gitee.io/js/tools/codeBlock.js"></script>




    
<script src="/jiesun.gitee.io/js/layouts/lazyload.js"></script>




    
<script src="/jiesun.gitee.io/js/tools/runtime.js"></script>

    
<script src="/jiesun.gitee.io/js/libs/odometer.min.js"></script>

    
<link rel="stylesheet" href="/jiesun.gitee.io/assets/odometer-theme-minimal.css">




  
<script src="/jiesun.gitee.io/js/libs/Typed.min.js"></script>

  
<script src="/jiesun.gitee.io/js/plugins/typed.js"></script>







<div class="post-scripts" data-swup-reload-script>
    
        
<script src="/jiesun.gitee.io/js/libs/anime.min.js"></script>

        
<script src="/jiesun.gitee.io/js/tools/tocToggle.js" type="module"></script>

<script src="/jiesun.gitee.io/js/layouts/toc.js" type="module"></script>

<script src="/jiesun.gitee.io/js/plugins/tabs.js" type="module"></script>

    
</div>


    <div id="aplayer"></div>

<script src="/jiesun.gitee.io/js/libs/APlayer.min.js"></script>


<script src="/jiesun.gitee.io/js/plugins/aplayer.js"></script>


</body>
</html>
